package com.com.hefei.wdp.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope // configClient 自动刷新的功能，
@RequestMapping
public class ConfigClientController {
    @Value("${config.info}") //获取gitHUb上的配置文件里的属性
    private String configInfo;
    @GetMapping("/info")
    public String getConfigInfo(){
        return configInfo;
    }
}
